<template>
  <div class="jianye-all_logo">
    <div v-if="type == 'LOGO_0'" class="logo_0 jianye-all_logo-box">
      <router-link to="/"><img :src="`${env.publicPath}images/logo-0.png`" alt=""></router-link>
    </div>

    <div v-if="type == 'LOGO_1'" class="logo_1 jianye-all_logo-box">
      <img :src="`${env.publicPath}images/logo-1.png`" alt="" @click.stop="onHome">
    </div>
  </div>
</template>

<script>
  export default {
    name: 'JianyeLogo',
    props: {
      type: {
        type: String,
        default: null
      }
    },
    methods: {
      onHome(){
        this.$router.push('/');
      },
    },
  }
</script>

<style lang="scss">
  .jianye-all_logo {
    .jianye-all_logo-box {
      position: relative;
      width: 100%;
      height: 100%;

      img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
      }
    }
  }
</style>
